-
-
Notifications
You must be signed in to change notification settings - Fork 236
support SAS temperature #816
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for SAS (SCSI) device temperature monitoring by extracting temperature data from SCSI environmental reports and exposing it as a temperature attribute in the smart monitoring system.
- Adds
ScsiTemperatureDatastruct to capture SCSI temperature information - Updates
ProcessScsiSmartInfoto accept and process temperature data from environmental reports - Implements
getScsiTemperaturehelper function to extract primary temperature reading
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| webapp/backend/pkg/models/collector/smart.go | Adds ScsiEnvironmentalReports field and ScsiTemperatureData struct to capture temperature data from SCSI devices |
| webapp/backend/pkg/models/measurements/smart.go | Updates SCSI processing to include temperature attribute and adds helper function to extract temperature value |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@AnalogJ please test/merge |
## [1.1.0](v1.0.0...v1.1.0) (2025-11-30) ### Features * Add "day" as resolution for temperature graph ([2670af2](2670af2)) * add day resolution for temperature graph (upstream PR [AnalogJ#823](https://github.com/Starosdev/scrutiny/issues/823)) ([2d6ffa7](2d6ffa7)) * add setting to enable/disable SCT temperature history (upstream PR [AnalogJ#557](https://github.com/Starosdev/scrutiny/issues/557)) ([c3692ac](c3692ac)) * Implement device-wise notification mute/unmute ([925e86d](925e86d)) * implement device-wise notification mute/unmute (upstream PR [AnalogJ#822](https://github.com/Starosdev/scrutiny/issues/822)) ([ea7102e](ea7102e)) * implement Prometheus metrics support (upstream PR [AnalogJ#830](https://github.com/Starosdev/scrutiny/issues/830)) ([7384f7d](7384f7d)) * support SAS temperature (upstream PR [AnalogJ#816](https://github.com/Starosdev/scrutiny/issues/816)) ([f954cc8](f954cc8)) ### Bug Fixes * better handling of ata_sct_temperature_history (upstream PR [AnalogJ#825](https://github.com/Starosdev/scrutiny/issues/825)) ([d134ad7](d134ad7)) * **database:** add missing temperature parameter in SCSI migration ([df7da88](df7da88)) * support transient SMART failures (upstream PR [AnalogJ#375](https://github.com/Starosdev/scrutiny/issues/375)) ([601775e](601775e)) * **ui:** fix temperature conversion in temperature.pipe.ts (upstream PR [AnalogJ#815](https://github.com/Starosdev/scrutiny/issues/815)) ([e0f2781](e0f2781)) ### Refactoring * use limit() instead of tail() for fetching smart attributes (upstream PR [AnalogJ#829](https://github.com/Starosdev/scrutiny/issues/829)) ([2849531](2849531))
|
This does not seem to populate the data for me, for some reason the ui still shows infinite symbol. 🤔 |
| // generate SmartScsiAttribute entries from Scrutiny Collector Smart data. | ||
| func (sm *Smart) ProcessScsiSmartInfo(defectGrownList int64, scsiErrorCounterLog collector.ScsiErrorCounterLog, temperature map[string]collector.ScsiTemperatureData) { | ||
| sm.Attributes = map[string]SmartAttribute{ | ||
| "temperature": (&SmartNvmeAttribute{AttributeId: "temperature", Value: getScsiTemperature(temperature), Threshold: -1}).PopulateAttributeStatus(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this not be SmartScsiAttribute? Unsure since the attributes seem similar properties.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like it might be parsing it as unknown attribute name
passed Unknown Attribute Name
27
Unknown
Type
Value
Worst/Thresh
Failure %
Scrutiny
27
--
--
Normalized
27
--/
--
Raw
--
--```
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah .... so I do not think this will work as intended. This seems to store the value into InfluxDB as metrics -> smart -> attr.temperature.value -> device_wwn -> device_protocol but the web app seems to be missing the bits to tie into everything which is why it is still showing as infinite.
It gets the data from Influx here
and since this is a SCSI drive it will popolate the metadata
and I think the web is temp from the smart attribute
| Temp int64 `json:"temp"` |
,,0,2025-11-30T20:54:37.872729924Z,2025-11-30T21:54:37.872729924Z,2025-11-30T21:10:20Z,0,attr.temperature.status,smart,SCSI,xxxxxxxxx
,,1,2025-11-30T20:54:37.872729924Z,2025-11-30T21:54:37.872729924Z,2025-11-30T21:10:20Z,28,attr.temperature.value,smart,SCSI,xxxxxxxxx
,,2,2025-11-30T20:54:37.872729924Z,2025-11-30T21:54:37.872729924Z,2025-11-30T21:10:20Z,1,power_on_hours,smart,SCSI,xxxxxxxxx
,,3,2025-11-30T20:54:37.872729924Z,2025-11-30T21:54:37.872729924Z,2025-11-30T21:10:20Z,0,temp,smart,SCSI,xxxxxx
(here is the influx data for the device I removed the WWN deice id)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you for testing this, can you point out how should I change it?
should close #717
scsi smart looks like this: